package com.sqx.modules.scFollow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author liyuan
 * @description sc_follow
 * @date 2021-08-12
 */
@Data
@ApiModel("sc_follow")
public class ScFollow implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("信息id")
    private Long followId;
    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    private Long userId;
    /**
     * 被关注的id
     */
    @ApiModelProperty("被关注的id")
    private Long byId;
    /**
     * 类型 1商品收藏 2商品想要 3关注用户 4收藏动态
     */
    @ApiModelProperty("类型 1商品收藏 2商品想要 3关注用户 4收藏动态")
    private Integer classify;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @ApiModelProperty("用户名")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty("用户头像")
    private String avatar;

    @TableField(exist = false)
    @ApiModelProperty("创建时间")
    private String createTimeStr;

    /**
     * isMutualFollow为0是单向关注(即回关)，1是互相关注
     */
    @ApiModelProperty("是否互相关注")
    private Integer isMutualFollow;

}
